Skip to content

sosl/H-FISTA

Repository files navigation

H-FISTA

Hierarchical FISTA - phase retrieval for pulsar spectroscopy

For a full description please see the published paper.

Installing dependencies

The main dependencies of our code include the widely used libraries such as NumPy, SciPy, and Astropy. For plotting, we use Matplotlib. Thus, it is possible you will be able to run H-FISTA without the need to install any extra libraries.

However, if you want do need to install dependencies, or wish to ensure the exact same versions of packages are used, we provide an easy way to do so. We recommend using python poetry for installing the dependencies:

poetry install

Alternatively, you can use pip:

pip -r requirements.txt

You might need to install additional LaTeX fonts used by matplotlib; e.g.

sudo apt install cm-super

And if using jupyter notebooks, you might also need to install dvipng; e.g.

sudo apt install dvipng

Input data

The data used in the publication and in the example notebooks can be obtained from Zenodo under this DOI: 10.5281/zenodo.7007226

H-FISTA accepts input data in ASCII format (as produced by psrflux, part of PSRchive), a FITS file, or a pickle. If using a notebook, you can use any custom reader as long as the data ends up in a NumPy array.

Example usage

To see how we used the code to produce the results in the paper, please see the notebooks included in this repostitory:

Command line usage

It is also possible to use the code on the command line. For example to reproduce the results for J0837+0610:

python HFISTA.py --data J0837+0610.fits --striation

Contributing

Contributions are welcome. Please use black for linting and, if possible, include tests.

About

Hierarchical FISTA - phase retrieval for pulsar spectroscopy

Resources

License

Stars

Watchers

Forks

Packages

No packages published